From 1089bf7ee8b34c6998dc8c971c7bab3832efc004 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sat, 22 Apr 2006 18:36:57 +0000 Subject: [PATCH] Check for zero values before rounding. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1941 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/holux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gpsbabel/holux.c b/gpsbabel/holux.c index f3f44876a..c63a02bd1 100644 --- a/gpsbabel/holux.c +++ b/gpsbabel/holux.c @@ -188,9 +188,8 @@ static void holux_disp(const waypoint *wpt) /* round it to increase the accuracy */ - lon += (double)((int)lon/abs((int)lon)) * .5; - lat += (double)((int)lat/abs((int)lat)) * .5; - + if (lon != 0) lon += (double)((int)lon/abs((int)lon)) * .5; + if (lat != 0) lat += (double)((int)lat/abs((int)lat)) * .5; sIndex = le_read16(&((WPTHDR *)HxWFile)->num); ((WPTHDR *)HxWFile)->idx[sIndex] = sIndex; /* set the waypoint index */ -- 2.30.2